﻿namespace JT808Gateway.Data
{
    public static class MainDb
    {
        /// <summary>
        /// 当前项目的主库
        /// </summary>
        public static string CurrentDbConnId = "1";
    }

    /// <summary>
    /// 多数据库连接对象
    /// </summary>
    public class MutiDBOperate
    {
        /// <summary>
        /// 连接ID
        /// </summary>
        public string ConnId { get; set; }

        /// <summary>
        /// 是否主库
        /// </summary>
        public bool MainDB { get; set; }

        /// <summary>
        /// 连接字符串
        /// </summary>
        public string Connection { get; set; }

        /// <summary>
        /// 数据库类型
        /// </summary>
        public DataBaseType DbType { get; set; }
    }

    public enum DataBaseType
    {
        MySql = 0,
        SqlServer = 1,
        Sqlite = 2,
        Oracle = 3,
        PostgreSQL = 4
    }
}